cmake_minimum_required(VERSION 3.8)
project(chassis_control_mi9)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(general_ctrl REQUIRED)

add_executable(CascadePIDCtrl src/CascadePIDCtrl.cpp)
target_include_directories(CascadePIDCtrl PRIVATE include)
ament_target_dependencies(CascadePIDCtrl rclcpp std_msgs sensor_msgs tf2 general_ctrl)

install(TARGETS CascadePIDCtrl DESTINATION lib/${PROJECT_NAME})
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})

ament_package()
